package com.ws.ssmzongjie3.service.impl;

import com.ws.ssmzongjie3.bean.Collections;
import com.ws.ssmzongjie3.bean.Route;
import com.ws.ssmzongjie3.mapper.CollectionsMapper;
import com.ws.ssmzongjie3.service.CollectionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CollectionsServiceImpl implements CollectionsService {
    @Autowired
    private CollectionsMapper collectionsMapper;
    @Override
    public int deleteCollectionById(Collections collection) {

        return collectionsMapper.deleteCollectionById(collection);
    }

    @Override
    public int insertCollection(Collections collection) {
        return collectionsMapper.insertCollection(collection);
    }

    @Override
    public int updateCollectionById(Collections collection) {
        return collectionsMapper.updateCollectionById(collection);
    }

    @Override
    public Collections getCollectionById(Collections collection) {
        return collectionsMapper.getCollectionById(collection);
    }

    @Override
    public List<Collections> listCollectionByUserId(Collections collection) {
        return collectionsMapper.listCollectionByUserId(collection);
    }

    @Override
    public int deleteCollection(Collections collection) {
        return collectionsMapper.deleteCollection(collection);
    }

    @Override
    public List<Route> RouteWithCollectionCountMap(Route route) {
        return collectionsMapper.RouteWithCollectionCountMap(route);
    }

    @Override
    public int countCollectionByRouteId(Integer route_id) {
        return collectionsMapper.countCollectionByRouteId(route_id);
    }
}
